<script>
export default {
  mounted () {
    let that = this
    // 调用云函数获取openId的测试
    wx.cloud.callFunction({ name: 'init' }).then(res => {
      that.$store.commit('updateOpenId', res.result.openid)
      console.log('调用云函数，获取OpenId等信息：', res)
    }).catch(err => console.error('调用云函数失败：', err))
  }
}
</script>
<style>
.section {
  margin: 20rpx 0rpx;
  text-align: center;
}
</style>
